Optimal. Leaf size=61 \[ -\frac{2 (-1)^{3/4} a \sqrt{d} \tanh ^{-1}\left (\frac{(-1)^{3/4} \sqrt{d \tan (e+f x)}}{\sqrt{d}}\right )}{f}-\frac{2 i a \sqrt{d \tan (e+f x)}}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0681346, antiderivative size = 61, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.115, Rules used = {3528, 3533, 208} \[ -\frac{2 (-1)^{3/4} a \sqrt{d} \tanh ^{-1}\left (\frac{(-1)^{3/4} \sqrt{d \tan (e+f x)}}{\sqrt{d}}\right )}{f}-\frac{2 i a \sqrt{d \tan (e+f x)}}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3528
Rule 3533
Rule 208
Rubi steps
\begin{align*} \int \sqrt{d \tan (e+f x)} (a-i a \tan (e+f x)) \, dx &=-\frac{2 i a \sqrt{d \tan (e+f x)}}{f}+\int \frac{i a d+a d \tan (e+f x)}{\sqrt{d \tan (e+f x)}} \, dx\\ &=-\frac{2 i a \sqrt{d \tan (e+f x)}}{f}-\frac{\left (2 a^2 d^2\right ) \operatorname{Subst}\left (\int \frac{1}{i a d^2-a d x^2} \, dx,x,\sqrt{d \tan (e+f x)}\right )}{f}\\ &=-\frac{2 (-1)^{3/4} a \sqrt{d} \tanh ^{-1}\left (\frac{(-1)^{3/4} \sqrt{d \tan (e+f x)}}{\sqrt{d}}\right )}{f}-\frac{2 i a \sqrt{d \tan (e+f x)}}{f}\\ \end{align*}
Mathematica [A] time = 0.0636103, size = 64, normalized size = 1.05 \[ -\frac{2 i a \sqrt{d \tan (e+f x)} \left (\sqrt{\tan (e+f x)}+\sqrt [4]{-1} \tanh ^{-1}\left ((-1)^{3/4} \sqrt{\tan (e+f x)}\right )\right )}{f \sqrt{\tan (e+f x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.018, size = 341, normalized size = 5.6 \begin{align*}{\frac{-2\,ia}{f}\sqrt{d\tan \left ( fx+e \right ) }}+{\frac{{\frac{i}{4}}a\sqrt{2}}{f}\sqrt [4]{{d}^{2}}\ln \left ({ \left ( d\tan \left ( fx+e \right ) +\sqrt [4]{{d}^{2}}\sqrt{d\tan \left ( fx+e \right ) }\sqrt{2}+\sqrt{{d}^{2}} \right ) \left ( d\tan \left ( fx+e \right ) -\sqrt [4]{{d}^{2}}\sqrt{d\tan \left ( fx+e \right ) }\sqrt{2}+\sqrt{{d}^{2}} \right ) ^{-1}} \right ) }+{\frac{{\frac{i}{2}}a\sqrt{2}}{f}\sqrt [4]{{d}^{2}}\arctan \left ({\sqrt{2}\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt [4]{{d}^{2}}}}}+1 \right ) }-{\frac{{\frac{i}{2}}a\sqrt{2}}{f}\sqrt [4]{{d}^{2}}\arctan \left ( -{\sqrt{2}\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt [4]{{d}^{2}}}}}+1 \right ) }+{\frac{ad\sqrt{2}}{4\,f}\ln \left ({ \left ( d\tan \left ( fx+e \right ) -\sqrt [4]{{d}^{2}}\sqrt{d\tan \left ( fx+e \right ) }\sqrt{2}+\sqrt{{d}^{2}} \right ) \left ( d\tan \left ( fx+e \right ) +\sqrt [4]{{d}^{2}}\sqrt{d\tan \left ( fx+e \right ) }\sqrt{2}+\sqrt{{d}^{2}} \right ) ^{-1}} \right ){\frac{1}{\sqrt [4]{{d}^{2}}}}}+{\frac{ad\sqrt{2}}{2\,f}\arctan \left ({\sqrt{2}\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt [4]{{d}^{2}}}}}+1 \right ){\frac{1}{\sqrt [4]{{d}^{2}}}}}-{\frac{ad\sqrt{2}}{2\,f}\arctan \left ( -{\sqrt{2}\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt [4]{{d}^{2}}}}}+1 \right ){\frac{1}{\sqrt [4]{{d}^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.03679, size = 590, normalized size = 9.67 \begin{align*} -\frac{\sqrt{-\frac{4 i \, a^{2} d}{f^{2}}} f \log \left (-\frac{{\left (2 \, a d +{\left (f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \sqrt{-\frac{4 i \, a^{2} d}{f^{2}}} \sqrt{\frac{-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{f}\right ) - \sqrt{-\frac{4 i \, a^{2} d}{f^{2}}} f \log \left (-\frac{{\left (2 \, a d -{\left (f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \sqrt{-\frac{4 i \, a^{2} d}{f^{2}}} \sqrt{\frac{-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{f}\right ) + 8 i \, a \sqrt{\frac{-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{4 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - a \left (\int - \sqrt{d \tan{\left (e + f x \right )}}\, dx + \int i \sqrt{d \tan{\left (e + f x \right )}} \tan{\left (e + f x \right )}\, dx\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.28548, size = 115, normalized size = 1.89 \begin{align*} 2 \, a{\left (\frac{\sqrt{2} \sqrt{d} \arctan \left (\frac{16 \, \sqrt{d^{2}} \sqrt{d \tan \left (f x + e\right )}}{-8 i \, \sqrt{2} d^{\frac{3}{2}} + 8 \, \sqrt{2} \sqrt{d^{2}} \sqrt{d}}\right )}{f{\left (-\frac{i \, d}{\sqrt{d^{2}}} + 1\right )}} - \frac{i \, \sqrt{d \tan \left (f x + e\right )}}{f}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]